package com.qdu.servlet;

import com.qdu.service.CommentService;
import com.qdu.service.impl.CommentServiceImpl;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Ice
 */
@WebServlet("/decs")
public class DeleteCommentServlet extends HttpServlet {

    CommentService commentService = new CommentServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        int cid = Integer.parseInt(req.getParameter("Cid"));
        
        commentService.deleteExistCommentByCid(cid);
    }

}
